﻿@model string
@inject IConfiguration Configuration

@{
    var ec = Configuration.GetSection("Editor").Get<EditorChoice>();
    var content = BlogConfig.ImageSettings.EnableCDNRedirect ? 
        Model.ReplaceCDNEndpointToImgTags(BlogConfig.ImageSettings.CDNEndpoint) : 
        Model;
}

@if (ec == EditorChoice.Markdown)
{
    @Html.Raw(ContentProcessor.MarkdownToContent(content, ContentProcessor.MarkdownConvertType.Html, false))
}
else
{
    @Html.Raw(content)
}